<template>
    <view class="">
        <atl-map :disable="disable"  :longitude="longitude" :latitude="latitude" :marker="marker" :mapKey="mapKey" :mapType="mapType" @confirm="confirm">
            <template v-slot:content>
                <view style="position: absolute; bottom: 0; width: 100%; height: 28rpx; background-color: white;border-radius:20rpx 20rpx 0 0;">
                    <view style="display: flex; align-items: center; justify-content: center;background: red;">
                    </view>
                </view>
            </template>
        </atl-map> 
    </view>
</template>

<script>
	export default {
	    data() {
	        return {
	            disable: false,
	            show: false,
	            title: '',
	            address: '',
	            longitude: '',
	            latitude: '',
	            imageSrc: '/static/logo.png', //自定义图片
	            marker: {
	                id: 1,
	                height: 50,
	                width: 40
	                // iconPath: '/static/comm/position.png'
	            },
	            mapKey: '7b8780d36e6a8289003fef7ae4a517c7',//高德地图测试key
	            // mapKey: 'TOEBZ-IYQKC-NOO2I-AZGA6-VPALQ-P6BQL', //腾讯地图测试key
	            // mapKey: 'p5mGzPEt30bwv1yEkeQGsGP4Xrs9xxxx', //百度地图
	            mapType: 'amap' // tmap bmap amap
	        };
	    },
	    onLoad() {},
	    methods: {
	        onClick() {
	            this.show = true;
	        },
	        confirm(e) {
	            if (e) {
	                this.longitude = e.longitude;
	                this.latitude = e.latitude;
	                this.title = e.title;
	                this.address = e.address;
					// uni.navigateTo({
					//   url: `/pages/Signin/Signin?longitude=${e.longitude}&latitude=${e.latitude}&title=${e.title}&address=${e.address}`
					// })
					let pages = getCurrentPages()
					let prePage = pages[pages.length - 2]
					prePage.$vm.form.institutionAddress = e.address
					prePage.$vm.form.institutionLatitude = e.latitude
					prePage.$vm.form.institutionLongitude = e.longitude
					uni.navigateBack({
						delta: 1
					})
	            }else{
					uni.navigateTo({
						url:'/pages/Signin/Signin'
					})
				}
	            this.show = false;
	        }
	    }
	};
</script>吗、